c# float to string with 2 decimals

85

c# float to string with 2 decimals -

myFloatVariable.ToString("0.00"); //2dp Number

myFloatVariable.ToString("n2"); // 2dp Number

myFloatVariable.ToString("c2"); // 2dp currency

Comments

Submit
0 Comments